<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>"/>
    
    <title>厦大植物检索与交流系统</title>
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
	<meta http-equiv="keywords" content="厦大,植物检索,"/>
	<meta http-equiv="description" content="厦大植物检索与交流系统"/>
	<link rel="stylesheet" type="text/css" href="css/common.css"/>
	<link rel="stylesheet" type="text/css" href="css/jquery.ui.all.css"/>
	<link rel="stylesheet" type="text/css" href="css/plantinfo.css"/>
	<link rel="stylesheet" type="text/css" href="css/jquery-ui-1.7.3.custom.css"/>
	<script type="text/javascript" language="javascript" src="js/jquery-1.7.1.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.dropdown.js"></script>
	<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.ui.core.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.ui.widget.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.ui.button.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.bgiframe-2.1.2.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.ui.mouse.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.ui.draggable.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.ui.position.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.ui.dialog.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.effects.core.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.effects.slide.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.effects.explode.js"></script>
	<script type="text/javascript" language="javascript" src="plantmanager/plantinfo.js"></script>
	 <script>
	$(function() {
		$( "input:button", "body" ).button();
		$( "#dialog-confirm" ).dialog({
			autoOpen: false,
			resizable: false,
			position: [600,400],
			show: "slide",
			hide: "explode",
			modal:true ,
			buttons: {
				"确定": function() {
					$( this ).dialog( "close" );
					sure();
					return true;
				},
				"取消": function() {
					$( this ).dialog( "close" );
					return false;
				}
			}
		});
	});
	</script>
  </head>
  
  <body>
<div id="wrapper">
	<div id="logo">
		<h1><a href="index.html">厦大植物检索与交流平台</a></h1>
	</div>
	<hr />
	<!-- end #logo -->
	<div id="header">
		<% 
			Integer userId = (Integer)request.getSession().getAttribute("userId");
			Integer role = (Integer)request.getSession().getAttribute("role");
		%>
		<div id="menu">
			<ul class="dropdown">
				<li><a href="index.html">首页</a>
				</li>
				<li><a>植物检索</a>
					<ul class="sub_menu">
     				   <li><a href="plantManager-showSubject.html">专题库查找</a></li>
   					   <li><a href="plantManager-kindList.html?move=0&page.currentPage=1&keOrShu=1">分等级检索</a></li>
        			   <li><a href="retrieval-toMultichannel.html">多通道检索</a></li>
					   <li><a href="plantManager-mapSearch.html">地图植物定位</a></li>
					</ul>
				</li>
   				<% if(userId != null && userId > 0 ){ %>
				<li><a>植物信息管理</a>
					<ul class="sub_menu">
     				   <li><a href="plantManager-toAddPlant.html">新增植物</a></li>
   					   <li><a href="plantManager-toAddSubject.html">新增专题</a></li>
   					    <% if( role != null && role == 3){ %>
   					   <li><a href="plant-listKindKe.html">分类管理</a></li>
   					   <%} %>
					</ul>
				</li>
   				<%} %>
				<li><a>个人植物库</a>
					<ul class="sub_menu">
   					   <% if(userId != null && userId > 0 ){ %>
        			   <li><a href="system-tomodifypwd.html">修改密码</a></li>
     				   <li><a href="user-showUserInfo.html">查看个人信息</a></li>
 				       <li><a href="user-toModifyUserInfo.html">修改个人信息</a></li>
 				       <% if(userId != null && userId > 0 && role != null && role == 3){ %>
 				       <li><a href="user-userlist.html">用户管理</a></li>
 				        <%} %>
 				       <li><a href="logout.html">退出</a></li>
 				       <%}else{ %>
     				   <li><a href="system-toLogin.html?isIntercepted=1">登录</a></li>
   					   <li><a href="system-registerinfo.html">注册</a></li>
 				        <%} %>
					</ul>
				</li>
				<li><a href="forum.html">论坛</a>
				</li>
			</ul>
		</div>
		<!-- end #menu -->
	</div>
	<!-- end #header -->
	<div id="page">
		<div id="content">
			<div class="plant">
				<input type="hidden" id="plantId" value="<s:property value="plant.idPlant"/>"/>
				<table id="plist">
					<tr>
						<td ><div class="name">名称</div></td>
						<td ><div class="content"><s:property value="plant.plantName"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">学名</div></td>
						<td ><div class="content"><s:property value="plant.scientificName"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">英文名</div></td>
						<td ><div class="content"><s:property value="plant.englishName"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">别名</div></td>
						<td ><div class="content"><s:property value="plant.alias"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">科</div></td>
						<td ><div class="content"><s:property value="plant.kindKe"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">属</div></td>
						<td ><div class="content"><s:property value="plant.kindShu"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">专题</div></td>
						<td ><div class="content"><s:property value="plant.subject"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">形态特征</div></td>
						<td ><div class="content"><s:property value="plant.characteristic"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">产地</div></td>
						<td ><div class="content"><s:property value="plant.originPlace"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">习性</div></td>
						<td ><div class="content"><s:property value="plant.habits"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">栽培要点</div></td>
						<td ><div class="content"><s:property value="plant.growPoint"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">用途</div></td>
						<td ><div class="content"><s:property value="plant.application"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">文化历史</div></td>
						<td ><div class="content"><s:property value="plant.culture"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">校园分布</div></td>
						<td ><div class="content"><s:property value="plant.campus"></s:property></div></td>
					</tr>
					<tr>
						<td ><div class="name">照片</div></td>
						<td ><div class="content">
							<s:iterator value="plant.imagePaths" id="image">
								<div class="pimage">
									<img src="<s:property value='#image'/>" />
								</div>
							</s:iterator>
						</div></td>
					</tr>
					<tr>
						<td ><div class="name">地理位置</div></td>
						<td ><div class="content"><div id="map"></div></div></td>

						<s:iterator value="locations" id="location">
							<script type="text/javascript">
							storeLocation(<s:property value="#location.longtitude"></s:property>,
										<s:property value="#location.latitude"></s:property>);
							</script>
						</s:iterator>
					</tr>
				</table>
				<div class="operator">
				
					<% if(userId != null && userId > 0 && role != null && role == 3){ %>
					<input type="button" value="修改植物信息" 
	onclick="location.href='plantManager-toModifyPlant.html?plantName=<s:property value="plant.plantName"></s:property>'" class="opbutton"/>
					<input type="button" value="删除该植物" onclick="$( '#dialog-confirm' ).dialog( 'open' );" class="opbutton"/>
					<input type="button" value="增加植物特性" onclick="location.href='retrieval-toAddFeature.html?plantId=<s:property value="plant.idPlant"/>'" class="opbutton"/>
					<%} %>
				</div>
			</div>
			<!-- end #plant -->
		</div>
		<!-- end #content -->
		<div style="clear: both;">&nbsp;</div>
		<div id="dialog-confirm" title="确定?">
			<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>确定删除此植物？</p>
		</div>
		<!-- end #dialog-confirm -->
	</div>
	<!-- end #page -->
	<div id="footer">
		<p>
		<a href="index.html">返回首页</a>|
            Copyright &copy; 2012 厦门大学软件学院</p>
	</div>
	<!-- end #footer -->
</div>
</body>
</html>
